Dynomotion

Group: DynoMotion Message: 13537 From: toolhoarder Date: 7/12/2016
Subject: Why Does KMotionCNC Hate Mach3 Arc Program?
Can anyone give me a clue why KMotionCNC messes up an arc program Mach3 executes correctly?

I got my lathe set up so it works fine with Mach3. I created an arc program using Mach3's turn wizards. It's supposed to make a domed end on a workpiece.

When I try to use it in KMotionCNC, the lathe tip tries to make a complete circle instead of an arc, and the x axis goes backward.

The axes work fine in simple linear tests. When I tell either axis to go back and forth 0.500", it will do it just fine.

Another odd thing: the x jog function doesn't agree with the arrows. Maybe that's a mill thing? Positive x is toward me, but the carriage moves away from me when I click the x jog arrow pointed toward me.

The x axis moves in the correct directions when I test it.

Code:

G18 G64 G80 G90 G40 G49
M3
G00 X0.172
G00 Z0.012
F2
G00 Z-0.015
G01 X0.16
G01 X0.16
G03 X0.146 Z0 I-0.16 K-0.135
G01 Z0.012
G00 X0.172
G00 Z-0.0311
G01 X0.16
G01 X0.16
G03 X0.1313 Z0 I-0.16 K-0.1189
G01 Z0.012
G00 X0.172
G00 Z-0.0488
G01 X0.16
G01 X0.16
G03 X0.1155 Z0 I-0.16 K-0.1012
G01 Z0.012
G00 X0.172
G00 Z-0.069
G01 X0.16
G01 X0.16
G03 X0.0983 Z0 I-0.16 K-0.081
G01 Z0.012
G00 X0.172
G00 Z-0.0946
G01 X0.16
G01 X0.16
G03 X0.0785 Z0 I-0.16 K-0.0554
G01 Z0.012
G00 X0.172
G00 Z-0.148
G01 X0.16
G01 X0.1593
G03 X0.0537 Z0 I-0.16 K-0.002
G01 Z0.012
G00 X0.172
G00 Z-0.148
G01 X0.16
G01 X0.152
G03 X0.0246 Z0 I-0.16 K-0.002
G01 Z0.012
G00 X0.172
F0.5
G00 Z-0.15
G01 X0.16
G01 X0.15
G03 X0 Z0 I-0.16 K-0
G01 Z0.012
G00 X0.172
M5
M30


Group: DynoMotion Message: 13541 From: Tom Kerekes Date: 7/12/2016
Subject: Re: Why Does KMotionCNC Hate Mach3 Arc Program?

Hi toolhoarder,

I believe Mach3 has an option to reverse CW and CCW directions.  If you were using that option to change G03 to G02 you will need to change those in your GCode.

Are you using a Front Lathe tool or a Rear lathe Tool?  KMotionCNC has a "X Positive Front" Option that may help with your X direction issue.  See:

http://dynomotion.com/Help/KMotionCNC/ToolSetupScreenTP.htm#Lathe_Options


The last two arcs in your GCode seem incorrect.

This code:

G00 Z-0.15
G01 X0.16
G01 X0.15
G03 X0 Z0 I-0.16 K-0

instructs an arc beginning at X 0.15 Z -0.15

to create arc with a center at X 0.01 Z -0.15

to end at X 0 Y 0

(I suspect you wanted I -0.15 ?)


Regards

TK




On 7/12/2016 4:45 PM, toolhoarder@... [DynoMotion] wrote:
 

Can anyone give me a clue why KMotionCNC messes up an arc program Mach3 executes correctly?

I got my lathe set up so it works fine with Mach3. I created an arc program using Mach3's turn wizards. It's supposed to make a domed end on a workpiece.

When I try to use it in KMotionCNC, the lathe tip tries to make a complete circle instead of an arc, and the x axis goes backward.

The axes work fine in simple linear tests. When I tell either axis to go back and forth 0.500", it will do it just fine.

Another odd thing: the x jog function doesn't agree with the arrows. Maybe that's a mill thing? Positive x is toward me, but the carriage moves away from me when I click the x jog arrow pointed toward me.

The x axis moves in the correct directions when I test it.

Code:

G18 G64 G80 G90 G40 G49
M3
G00 X0.172
G00 Z0.012
F2
G00 Z-0.015
G01 X0.16
G01 X0.16
G03 X0.146 Z0 I-0.16 K-0.135
G01 Z0.012
G00 X0.172
G00 Z-0.0311
G01 X0.16
G01 X0.16
G03 X0.1313 Z0 I-0.16 K-0.1189
G01 Z0.012
G00 X0.172
G00 Z-0.0488
G01 X0.16
G01 X0.16
G03 X0.1155 Z0 I-0.16 K-0.1012
G01 Z0.012
G00 X0.172
G00 Z-0.069
G01 X0.16
G01 X0.16
G03 X0.0983 Z0 I-0.16 K-0.081
G01 Z0.012
G00 X0.172
G00 Z-0.0946
G01 X0.16
G01 X0.16
G03 X0.0785 Z0 I-0.16 K-0.0554
G01 Z0.012
G00 X0.172
G00 Z-0.148
G01 X0.16
G01 X0.1593
G03 X0.0537 Z0 I-0.16 K-0.002
G01 Z0.012
G00 X0.172
G00 Z-0.148
G01 X0.16
G01 X0.152
G03 X0.0246 Z0 I-0.16 K-0.002
G01 Z0.012
G00 X0.172
F0.5
G00 Z-0.15
G01 X0.16
G01 X0.15
G03 X0 Z0 I-0.16 K-0
G01 Z0.012
G00 X0.172
M5
M30



Group: DynoMotion Message: 13547 From: toolhoarder Date: 7/13/2016
Subject: Re: Why Does KMotionCNC Hate Mach3 Arc Program?
Are you saying Mach3's turn wizards would create different code with the rotation reversed? It automatically does that? I can look it over and see if I've changed anything.

I don't understand why the tool would make a complete circle in KMotionCNC instead of the arc it makes in Mach3. A direction problem would not cause that.

The code above came straight from the Mach3 wizard, not me. I didn't touch it. The problem with the arc happens very early in the program. If the last two arcs are wrong, it wouldn't explain the problem, because the lathe always crashes long  before that point.
Group: DynoMotion Message: 13549 From: menatman Date: 7/13/2016
Subject: Re: Why Does KMotionCNC Hate Mach3 Arc Program?
I am not an expert, and I may be wrong, but I believe

Actually it would. It is just doing an arc with an end point and a center point. If your arc direction or start point are wrong it will just move in the direction specified around the center point to the end point.

For example 
If zeroed at part center in X and Z from the end of your work.

G02 X-1 Z-1 I0 K-1
Would cut a 1" radius in a 90°arc,

If you flip the X axis, it would cut a 270° arc.


If your X axis is reversed from your mach3 setup I believe it would cause your problem.

That is why Tom was asking if you are cutting from the front or back.




Sent via the Samsung Galaxy S®6 active, an AT&T 4G LTE smartphone
Group: DynoMotion Message: 13550 From: Tom Kerekes Date: 7/13/2016
Subject: Re: Why Does KMotionCNC Hate Mach3 Arc Program?

Hi toolhoarder,

No I wasn't saying that, you'd have to check with Mach3 how the wizard works.  I'm just saying the arcs seem backwards.

The arcs aren't complete circles.  They are just going the other direction around the circle.  So instead of say 45 degrees of an arc they are 315 degrees of an arc.

Try reversing them.  You might use KMotionCNC's find/replace G03 -> G02

I realize the last two arcs are not the cause of the arcs being backwards.  I was just pointing out that I believe the GCode specifies an incoherent set of begin, end, and center of arc points.  Plot them and you should see what I mean. Maybe you specified an impossible set of parameters to the Wizard and it didn't detect the error.

HTH

Regards

TK



On 7/13/2016 7:06 AM, toolhoarder@... [DynoMotion] wrote:
 

Are you saying Mach3's turn wizards would create different code with the rotation reversed? It automatically does that? I can look it over and see if I've changed anything.

I don't understand why the tool would make a complete circle in KMotionCNC instead of the arc it makes in Mach3. A direction problem would not cause that.

The code above came straight from the Mach3 wizard, not me. I didn't touch it. The problem with the arc happens very early in the program. If the last two arcs are wrong, it wouldn't explain the problem, because the lathe always crashes long  before that point.


Group: DynoMotion Message: 13577 From: toolhoarder Date: 7/14/2016
Subject: Re: Why Does KMotionCNC Hate Mach3 Arc Program?
I started working on it today. Some remarkable things happened.

A number of the settings in the Trajectory area were simply gone, so I had to re-enter them. Before I did this, x commands moved the z motor and vice-versa. No idea how that happened.

Also, KMotionCNC kept reverting to millimeters, and the tool kept changing from a triangular lathe tool to an end mill. I must have done something to cause that. It looks like you have to recheck every setting every time you change anything. I will have to keep a paper checklist beside the lathe and go through it every time I make a change.

The program doesn't just cut a complete circle; it repeats the circle, going past 360 degrees. Changing the direction (cutting toward or away from the operator) makes no difference. It does not cut big arcs. It cuts circles.

I decided to get a Mach3 license, since I don't have any problems with Mach3. Maybe I'll be able to get KMotionCNC to work eventually.